import requests

# url = 'http://lilly.zenm.vip/profile_add.html'
# url = 'https://www.cnblogs.com/ppzhang/p/10202988.html'
url = 'https://www.cnblogs.com/apollo1616/p/9510322.html'
res = requests.get(url)

res.encoding = 'utf-8'

with open('os模块.html', 'w', encoding='utf-8') as f:
    f.write(res.text)